<!DOCTYPE html>
<html lang="zh-cmn-Hans">

<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, shrink-to-fit=no" />
  <meta name="theme-color" content="#000000" />
  <meta name="baidu-site-verification" content="av1qNEB64f" />
  <link type="image/x-icon" rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
  <title>金坤的个人网站</title>
  <meta name="keywords" content="个人网站,个人博客,前端" />
  <meta name="description" content="金坤的个人站，左边是艺术，右边是科学" />
  <link rel="manifest" href="/manifest.json" />
  <script src="./waterfall.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/three.js/100/three.js"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/stats.js/14/Stats.min.js"></script>
  <script type="text/javascript">
    var deferredPrompt = null;

    // 判断用户是否安装此应用：beforeinstallprompt,如果用户已经安装过了,那么该事件不会再次触发
    // 需要卸载，然后重新打开浏览器才能再次触发
    // window.addEventListener("beforeinstallprompt", e => {
    //   e.preventDefault();
    //   deferredPrompt = e;
    // });
    // // 安装完成后触发,即点击安装弹窗中的“安装”后被触发
    // window.addEventListener("appinstalled", () => {
    //   deferredPrompt = null;
    // });
    if (window.localStorage.getItem('isjk') !== '1') {
      document.oncontextmenu = function (e) {
        return false;
      };
      document.oncontextmenu = new Function('event.returnValue=false');
      document.onselectstart = new Function('event.returnValue=false');
    }
    if ('serviceWorker' in navigator) {
    window.addEventListener('load', () => {
      navigator.serviceWorker.register('/sw.js')
        .then(registration => {
          console.log('ServiceWorker registration successful with scope: ', registration.scope)
        })
        .catch(err => {
          console.log('ServiceWorker registration failed: ', err)
        })
    })
  }
  </script>
  <script>
    window.__START_DATE__ = Date.now();
  </script>
  <script>
    var _hmt = _hmt || [];
    (function () {
      var hm = document.createElement('script');
      hm.src = 'https://hm.baidu.com/hm.js?57bdeae75b194e76bc0f72fec77cd7f2';
      var s = document.getElementsByTagName('script')[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>

  <style>
    body {
      background: #4c5ea2;
    }

    #pageloading {
      position: fixed;
      top: 0;
      left: 0;
      z-index: 999;
      width: 100vw;
      height: 100vh;
      transform: scaleX(0);
      -webkit-transform: scaleX(0);
      transform-origin: left;
      -webkit-transform-origin: left;
      background-color: #ffd03f;
      -webkit-transition: -webkit-transform 0.15s;
      transition: -webkit-transform 0.15s;
      -o-transition: transform 0.15s;
      transition: transform 0.15s;
      transition: transform 0.15s, -webkit-transform 0.15s;
    }
  </style>
</head>

<body>
  <noscript>
    <strong>不开启js要死啊</strong>
  </noscript>
  <div id="root"></div>
  <div id="pageloading"></div>
</body>

</html>
